<?php defined( '_SYS' ) or die( 'No direct script access allowed' );?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $SYS->doc->getTitle(); ?></title>
<?php echo $this->headData; ?>
</head>
<body>
<div class="top">
    <div style="width:100%;">
		<iframe allowtransparency="true" style="padding-top:0px; margin-top:0px; position:absolute; height:30px; width:50%; line-height:30px; right:20px; top:0px; z-index:100; background-color=transparent " src="http://www.metinfo.cn/metnewslist.php?fromurl=$met_weburl&softtype=1" frameborder=0 scrolling=no ></iframe>
	</div> 
   <div class="top_bottom">
   <div class="top_left"><a href="http://www.knifecms.com" target="_blank" hidefocus="true"><img src="<?php echo $this->imagePath;?>logo.gif" alt="KnifeCMS"  /></a></div>
<div class="top_right">
<div class="top_right_top"></div>
<div class="top_list">
   <ul id="top_ul">
		<?php
			$topname = array(C_text::_("Basic"),C_text::_('FeedbackSetting'),C_text::_('Feedback'),C_text::_('Online'));
			$leftname = array(
							array(	
									'language'=>C_text::_('Language'),
									'config'=>C_text::_('Config'),
									'user'=>C_text::_('User'),
									'database'=>C_text::_('Database')
								),
							array(
									'fdform'=>C_text::_('Form'),
									'fdparameter'=>C_text::_('Parameter')
								),
							array(									
									'feedback'=>C_text::_('FeedbackResult'),
									'statistics'=>C_text::_('Statistics')
								),
							array(									
									'online'=>C_text::_('Online')
								)
						)
			;
			$topaccess = array(
							!admin::permit('language.display.option.site',true) && !admin::permit('user.display.option.users',true) && !admin::permit('config.display',true) && !admin::permit('database.display.option.backup',true),
							!admin::permit('fdform.display',true) && !admin::permit('fdparameter.display',true) ,
							!admin::permit('feedback.display',true) && !admin::permit('statistics.display',true),
							!admin::permit('online.display',true)
			);
			$leftaccess = array(
							array(	
									admin::permit('language.display.option.site',true),
									admin::permit('config.display',true),
									admin::permit('user.display.option.users',true),									
									admin::permit('database.display.option.backup',true)
								),
							array(
									admin::permit('fdform.display',true),
									admin::permit('fdparameter.display',true)
								),
							array(									
									admin::permit('feedback.display',true),
									admin::permit('statistics.display',true)
								),
							array(									
									admin::permit('online.display',true)
								)
			);
			$topcount=0;
			for($i=0;$i<count($topname);$i++)
			{				
				if(!$topaccess[$i])
				{
					if($topcount==0) $style = 'class="li_ok" style="color:#FFFFFF;"';
					else $style='style="color:#40a0d7"';
					echo '<li><a href="#" onfocus="if(this.blur) this.blur();" onclick="san('.$topcount.')" '.$style.' >'.$topname[$i].'</a></li>';
					$topcount++;
				}
			}
		?>
	    <div style="clear:both;"></div>
   </ul>
	 <div class="top_admin"><span><?php echo C_text::_('Welcome');?>&nbsp;</span>: <?php echo $this->metinfo_admin_name;?></div>
</div>
   <div style="clear:both;"></div>
   <div class="top_right_bottom"></div>
</div>
</div>
</div>

<div class="bottom" >
<table width="100%"  height="100%" cellpadding="0" cellspacing="0" >
<tr>
<td  valign="top" style="width:170px; *width:172px; _width:174px; z-index:2;">
<div class="left" id="leftheight" >
     <div class="left_top">
	      <a target="_blank" href="<?php echo SITEURL.'/'.SELF;?>"><?php echo C_text::_('Home');?></a>&nbsp;&nbsp;<a href="<?php echo WEBSELF;?>?sysadmin" target="main"><?php echo C_text::_('Admin');?></a>&nbsp;&nbsp;<a target="_top" href="<?php echo WEBSELF;?>?logout"><?php echo C_text::_('Logout');?></a>	 </div>
	 <div class="left_content">
<!--——————————————————————栏目开始————————————————————————————-->
	<?php
			$topcount=0;
			for($i=0;$i<count($topname);$i++)
			{
				if($topaccess[$i]) continue;
				if($topcount==0) $style='';
				else $style='style="display:none;"';
		echo "<div id=\"list" . $topcount . "\" class=\"left_u\" " . $style . ">";
	?>
	    <ul id="left_ul<?php echo $topcount+1;?>" class="pt">
				<?php
					$j=0;
					$leftcount = 0;
					foreach($leftname[$i] AS $key=>$value)
					{
						if($leftaccess[$i][$j]):
				?>		
		<li><a target="main" onfocus="if(this.blur)this.blur();" id="list<?php echo $topcount.'_'.$leftcount;?>" href="<?php echo WEBSELF;?>/<?php echo $key;?>" onclick="san1(<?php echo ($topcount+1).','.$leftcount;?>)" class="left_clicka" style=" border:1px solid  #c5edf9; color:#1788c2;"><?php echo $value;?></a></li>
				<?php 
						$leftcount++;
						endif;
						$j++;
					}
					if($j > 0) $topcount++;
				?>
		</ul>
	<?php
		echo "</div>";
			}
	?>
	<div class="left_footer">
	    Powered by <b><a href='http://www.knifecms.com' target='_blank'>KnifeCMS</a></b><br /> ©2008- <?php echo date('Y',time());?>&nbsp;<a href='http://www.knifecms.com' target='_blank'>www.knifecms.com</a>
		</div>

	</div>
	</div>
</td>
<td class="right" valign="top" bgcolor="#FFFFFF"><iframe frameborder="0" id="main" name="main" src="<?php echo WEBSELF;?>/sysadmin" scrolling="yes" class="iframe_main" ></iframe>&nbsp;</td>
</tr>
</table>
</div>
<script language="javascript" >
		var top_c = document.getElementById("top_ul").getElementsByTagName("a");
		function san(ao)
		{
			for(var i=0; i<top_c.length;i++)
			{
				list=document.getElementById("list"+i);
				if( ao == i)
				{
					top_c[i].className="clicka";
					top_c[i].style.color="#ffffff";
					list.style.display = "block";
					var srcshow="list"+i+"_0";
					if(document.getElementById(srcshow)){
						document.getElementById("main").src=document.getElementById(srcshow).href;
					}else{
						document.getElementById("main").src='<?php echo WEBSELF;?>?sysadmin';
					}
					san1(ao+1,0);
				}else{
					top_c[i].className="clickb";
					top_c[i].style.color="#40a0d7";
					list.style.display = "none";
				}
			}
		}
	  function san1(ao,nowao)
	  {
	    var left= document.getElementById("left_ul"+ao).getElementsByTagName("a");
	    for(var i=0; i<left.length;i++)
		{
			if( nowao == i){
				
				left[i].className="left_clickb";
				left[i].style.border="none";
				left[i].style.color="#777777";
			}else{
				left[i].className="left_clicka";
				left[i].style.border="1px solid #c5edf9";
				left[i].style.color="#1788c2";
			}
		}
	  }
</script>
</body>
</html>